package org.point.dao.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import org.point.common.dao.impl.BaseDaoImpl;
import org.point.dao.ConvertRuleDetailDao;
import org.point.dao.ConvertRuleDetailDao;
import org.point.dao.ConvertRuleDetailDao;
import org.point.domain.ConvertRuleDetail;
import org.point.domain.MaxNo;
import org.springframework.stereotype.Repository;

/**
 * 
 * @ClassName: ConvertRuleDetailDaoImpl  
 * @Description: TODO(兑换规则明细数据实现类)  
 * @author Kenny_Z' szqiuk@gmail.com
 * @date 2016年10月23日 下午3:28:17  
 *
 */
@Repository("convertRuleDetailDao")
public class ConvertRuleDetailDaoImpl extends BaseDaoImpl<ConvertRuleDetail, Serializable> implements ConvertRuleDetailDao {

	private static final String SQL_SEARCHMAXNO = "searchMaxNo";
	
	private static final String SQL_UPDATEMAXNO = "update_MaxNo";
	
	/**
	 * 利用反射，获取mapper.xml的namespace
	 * <p>Title: </p>  
	 * <p>Description: </p>
	 */
	public ConvertRuleDetailDaoImpl() {
		namespace = super.getNamespace();
	}

	public MaxNo selectMaxNo() {
		MaxNo record = null;
		try {
			record = getSqlSession().selectOne(namespace+SQL_SEARCHMAXNO);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return record;
	}

	public void updateMaxNo(MaxNo item) {
		try {
			getSqlSession().update(namespace+SQL_UPDATEMAXNO, item);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
